﻿using System;

namespace ConsoleApp1
{
    internal class Program
    {
        static void Main(string[] args)
        {

            Rectangle r = new Rectangle();
            r.Acceptdetails();
            r.Display();
            Console.ReadLine();
        }
    }

    class Rectangle
    {
        double length;
        double width;
        public void Acceptdetails()
        {
            Console.WriteLine("请输入长度：");

            length = Convert.ToDouble(  Console.ReadLine());
            Console.WriteLine("请输入宽度：");
            width = Convert.ToDouble( Console.ReadLine());
        }
        public double GetArea()
        {
            return length * width;
        }
        public void Display()
        {
            Console.WriteLine("length:{0}", length);
            Console.WriteLine("width:{0}", width);
            Console.WriteLine("Area:{0}", GetArea());
        }
    }
}
